<%--
  Created by IntelliJ IDEA.
  User: zhouz
  Date: 2023/12/4
  Time: 15:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<input type="text" name="name" id="name">


<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#name").blur(function () {
            $.ajax({
                type: "get",
                url: "${pageContext.request.contextPath}/form/check?name=" + encodeURI($("#name").val()),
                success: function (data) {
                    console.log(data);
                }

            })
        });
    });
</script>

</body>
</html>
